package com.kapuscinski.saferoute.database;

public class DataModel {

	private double latitude, longitude;
	private float acceleration, accuracy;

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public float getAcceleration() {
		return acceleration;
	}

	public void setAcceleration(float acceleration) {
		this.acceleration = acceleration;
	}

	@Override
	public boolean equals(Object o) {
		DataModel object = (DataModel) o;
		if (o instanceof DataModel) {
			if (latitude == object.latitude
					&& longitude == object.getLongitude()
					&& acceleration == object.getAcceleration()) {
				return true;
			} else {
				return false;
			}
		} else {
			return false;
		}
	}
	
	@Override
	public int hashCode() {
		return (int) (acceleration*latitude*longitude);
	}

	public float getAccuracy() {
		return accuracy;
	}

	public void setAccuracy(float accuracy) {
		this.accuracy = accuracy;
	}

}
